package StudyCode.summary.mycollection;

import java.util.List;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class GetAverageOfLongList {
	public static float getAverage(List<Long> allTimes) {
		long total = getTotal(allTimes);
		return total / (float) allTimes.size();
	}

	public static long getTotal(List<Long> times) {
		long total = 0;
		for (Long time : times) {
			total = total + time;
		}
		return total;
	}
}
